<%@page isELIgnored="false" pageEncoding="UTF-8" contentType="text/html; UTF-8" %>
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>管理员列表</title>
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<link rel="stylesheet" href="${pageContext.request.contextPath}/layui/css/layui.css" />
	<script type="text/javascript" src="${pageContext.request.contextPath}/layui/layui.js"></script>
</head>
<body>
<!--分页表格-->
	<table id="admin" lay-filter="admin"></table>
	<script type="text/javascript">
		layui.use("table", function () {
			var table = layui.table;
			var $ = layui.jquery;
			table.render({
				elem: "#admin",
				cols: [[
					{field: "id", title: "编号", sort: true},//fixed：冻结窗格   , fixed: "left"
					{field: "username", title: "名字"},
					{field: "password", title: "密码"},
					{title:"操作",toolbar:"#operation"}]],
				url: "${pageContext.request.contextPath}/admin/admins",
				page: true,//开启分页
				limits:[5,10,20],//每页条数的选择项
				limit:5,//每页显示的条数，默认：10
				toolbar:"#tool"
			});
		})
	</script>
<!--修改删除操作按钮-->
	<script id="operation" type="text/html">
		<button class="layui-btn layui-btn-xs" lay-event="edit">修改</button>
		<button class="layui-btn layui-btn-xs" lay-event="remove">删除</button>
	</script>
<!--工具栏按钮-->
	<script type="text/html" id="tool">
<%--	<button class="layui-btn layui-btn-xs" onclick="openAddModal()">添加<i class="layui-icon layui-icon-addition"></i></button>--%>
		<button class="layui-btn layui-btn-xs" >添加<i class="layui-icon layui-icon-addition"></i></button>
	</script>
</body>

</html>